Road segment speed prediction method, apparatus, server, medium, and program product

ABSTRACT

Embodiments of this application provide a target road segment speed prediction method, apparatus, a server, and a non-transitory computer-readable medium. In the method, a first moving speed on a target road segment at a first time point is obtained. A plurality of second moving speeds on the target road segment at each of a plurality of time points before the first time point is obtained. A mean historical speed on the target road segment at the first time point during previous time cycles is obtained. A speed prediction feature of the target road segment at a second time point is determined. A moving speed on the target road segment at the second time point is predicted according to the speed prediction feature of the target road segment at the second time point and a pre-trained road segment speed prediction model.

RELATED APPLICATION

This application is a continuation of International Application No.PCT/CN2018/109688, filed on Oct. 10, 2018, which claims priority toChinese Patent Application No. 201711014944.4, entitled “ROAD SEGMENTSPEED PREDICTION METHOD, APPARATUS, SERVER, AND STORAGE MEDIUM,” andfiled on Oct. 25, 2017. The entire disclosures of the prior applicationsare hereby incorporated by reference in their entirety.

FIELD OF THE TECHNOLOGY

This application relates to the field of transportation.

BACKGROUND OF THE DISCLOSURE

A road segment speed of a road segment is a mean value of vehicle speedsof the road segment at a specific moment. The road segment speed iswidely applied to scenarios, such as traffic condition-based routecalculation in navigation. For example, a traffic condition of a roadsegment may be determined according to the road segment speed, toperform an accurate calculation for choosing an advantageous roadsegment in a navigation process. The advantageous road segment may beunderstood as a road segment that is relatively unobstructed in a roadnetwork.

To improve the result of a traffic condition-based route calculation, itis very important to predict a road segment speed of a specific roadsegment at a future moment. Therefore, how to improve accuracy of roadsegment speed prediction is a problem that a person skilled in the artneeds to consider.

SUMMARY

In view of this, embodiments of this application provide a road segmentspeed prediction method, an apparatus, a server, and a non-transitorycomputer-readable medium, to improve the accuracy of road segment speedprediction.

According to an embodiment of the present disclosure, a method ofpredicting a moving speed of a target road segment is provided. In themethod, a first moving speed on the target road segment at a first timepoint is obtained. A plurality of second moving speeds on the targetroad segment at each of a plurality of time points before the first timepoint is obtained. A mean historical speed on the target road segment atthe first time point during previous time cycles is obtained. A speedprediction feature of the target road segment at a second time point isdetermined based on the first moving speed, the plurality of secondmoving speeds, and the mean historical speed on the target road segmentat the first time point during the previous time cycles, the second timepoint being subsequent to the first time point. The moving speed on thetarget road segment at the second time point is predicted according tothe speed prediction feature of the target road segment at the secondtime point and a pre-trained road segment speed prediction model.

In an embodiment, a speed prediction training feature of the target roadsegment is determined at each of a plurality of time points in aplurality of time cycles of a time range. A plurality of pieces ofsample data is determined based on the determined speed predictiontraining features of the target road segment. Each of the plurality ofpieces of sample data represents the speed prediction training featureof the target road segment at one of the plurality of time points in theplurality of the time cycles of the time range. The road segment speedprediction model is trained according to a machine learning algorithmand the plurality of pieces of sample data. The speed predictiontraining feature of the target road segment at the one of the pluralityof time points during one of the plurality of time cycles includes aspeed on the target road segment at the one of the plurality of timepoints, a speed on the target road segment at each of a subset of theplurality of time points before the one of the plurality of time points,and a mean historical speed on the target road segment at the one of theplurality of time points during the one of the plurality of time cycles.

In an embodiment, the speed prediction training feature of the targetroad segment at the one of the plurality of time points includes a speedclustering interval of the speed on the target road segment at the oneof the plurality of time points, a previous speed clustering intervaland a next speed clustering interval of the speed clustering interval, atime point at which the target road segment enters the speed clusteringinterval, a duration during which the target road segment is in thespeed clustering interval, and a road segment feature of the target roadsegment.

In an embodiment, the speed prediction feature of the target roadsegment is determined at the second time point according to the firstmoving speed, the plurality of second moving speeds, the mean historicalspeed on the target road segment at the first time point during theprevious time cycles, a target speed clustering interval of the speed onthe target road segment at the first time point, a previous speedclustering interval and a next speed clustering interval of the targetspeed clustering interval, a time point at which the target road segmententers the target speed clustering interval, a duration during which thetarget road segment is in the target speed clustering interval, and aroad segment feature of the target road segment.

In an embodiment, a mean historical speed on the target road segment foreach of the plurality of time points is determined. The mean historicalspeed on the target road segment for each of the plurality of timepoints is clustered a plurality of times until a center of each speedclustering interval is the same as a center of a previous speedclustering interval.

In an embodiment, the mean historical speed on the target road segmentat k time points are randomly selected as initial centers of k speedclustering intervals. For the mean historical speed for each of aplurality of remaining time points, at least one of the initial centerstemporally connected to the respective remaining time point isdetermined, a dissimilarity between the mean historical speed at therespective remaining time point and the at least one of the initialcenters is determined, and the mean historical speed at the respectiveremaining time point is clustered into the speed clustering intervalcorresponding to one of the at least one of the initial centers that hasa lowest dissimilarity. The initial centers are adjusted based on theclustered mean historical speed at each of the plurality of remainingtime points. The mean historical speed at each of the plurality of timepoints is re-clustered based on the adjusted initial centers. The meanhistorical speed at each of the plurality of time points is re-clusteredby using a center of each speed clustering interval of previousclustering until a center of each re-clustered speed clustering intervalis the same as the center of each speed clustering interval of theprevious clustering.

In an embodiment, each of the speed clustering intervals includes a timeperiod dimension and a road segment speed dimension. Further, the targetspeed clustering interval of the speed on the target road segment at thefirst time point is one of the speed clustering intervals which includesa time period dimension that matches the first time point.

In an embodiment, for one piece of the plurality of sample data, a roadsegment speed at a corresponding time point in the sample data predictedusing the pre-trained road segment speed prediction model is comparedwith a real road segment speed at the corresponding time point in thesample data. The one piece of the plurality of sample data is determinedas noise when a difference between the road segment speed at thecorresponding time point in the sample data predicted using thepre-trained road segment speed prediction model and the real roadsegment speed at the corresponding time point in the sample data isgreater than a threshold. Smoothing is performed on the noise by using aKalman filter.

In an embodiment, the target road segment is determined according to aroad segment identifier of the target road segment from a plurality ofroad segments presented on a map, and the predicted moving speed on thetarget road segment is associated at the second time point with thetarget road segment. A road segment weight of the target road segment isdetermined at the second time point by dividing a road segment length ofthe target road segment by the predicted moving speed on the target roadsegment at the second time point. The target road segment is determinedas an advantageous road segment in a road network when the road segmentweight of the target road segment at the second time point is greaterthan a threshold. The target road segment presented on the map is addedto a traveling route.

Aspects of the disclosure also provide a server that performs any of theabove methods.

Aspects of the disclosure also provide one or more non-transitorycomputer-readable storage mediums storing instructions which whenexecuted by a computer cause the computer to perform any of the abovemethods.

In the road segment speed prediction method provided according to anembodiment of this application, factors affecting accuracy of roadsegment speed prediction are considered, when the road segment speed ofthe target road segment at the first moment is determined, the roadsegment speed at the second moment that is in the future and that has apredetermined time difference from the first moment is determined byusing the road segment speed prediction model. The road segment speedprediction model is pre-trained by using a machine learning algorithm.The road segment speed may be predicted with the help of characteristicsof high availability and high accuracy of the road segment speedprediction model trained by using the machine learning algorithm, sothat controllability of an error of a road segment speed predictionresult is improved, and accuracy of the road segment speed predictionresult is improved.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions of the embodiments of thisapplication or the related technology more clearly, the followingintroduces the accompanying drawings required for describing theembodiments or the related technology. The accompanying drawings in thefollowing description show only the embodiments of this application, anda person of ordinary skill in the art may still derive other drawingsfrom the provided accompanying drawings.

FIG. 1 is a flowchart of a road segment speed prediction methodaccording to an embodiment of this application.

FIG. 2 is a flowchart of training of a road segment speed predictionmodel according to an embodiment of this application.

FIG. 3 is a flowchart of division of speed clustering intervalsaccording to an embodiment of this application.

FIG. 4 is a flowchart of training a road segment speed prediction modelaccording to an embodiment of this application.

FIG. 5 is a flowchart of a road segment speed prediction methodaccording to an embodiment of this application.

FIG. 6 is an exemplary diagram of a road segment speed predictionfeature according to an embodiment of this application.

FIG. 7 is a schematic diagram of a comparison between a road segmentspeed of a road segment in each minute of a specific day and a roadsegment speed mean value of the road segment speed in each minute of onemonth according to an embodiment of this application.

FIG. 8 is a schematic diagram of a comparison between a road segmentspeed in a specific minute predicted by a road segment speed predictionmodel and a real road segment speed in sample data according to anembodiment of this application.

FIG. 9 is an exemplary diagram of a road segment speed changing withtime according to an embodiment of this application.

FIG. 10 is an exemplary diagram of an application of performing routecalculation by using a road segment weight in a mobile phone mapaccording to an embodiment of this application.

FIG. 11 is a structural block diagram of a road segment speed predictionapparatus according to an embodiment of this application.

FIG. 12 is a structural block diagram of a road segment speed predictionapparatus according to an embodiment of this application.

FIG. 13 is a structural block diagram of a road segment speed predictionapparatus according to an embodiment of this application.

FIG. 14 is a structural block diagram of a road segment speed predictionapparatus according to an embodiment of this application.

FIG. 15 is a structural block diagram of a road segment speed predictionapparatus according to an embodiment of this application.

FIG. 16 is a block diagram of a hardware structure of a server accordingto an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

Related technologies for determining a road segment speed includecomputing a mean value of road segment speeds of a specific road segmentat each historical moment and approximating a mean value of road segmentspeeds of the specific road segment at a specific historical moment as aroad segment speed of the road segment at a future moment that is thesame as the historical moment. For example, when predicting a roadsegment speed for the next minute (e.g., 10:10), one solution is tocompute a mean value of historical road segment speeds of a road segmentat 10:10, and approximating the mean value as a road segment speed ofthe road segment for the next minute (e.g., 10:10). However, arelatively large quantity of factors affect a road segment speed at afuture moment, the above-described solution is merely approximating amean value of historical road segment speeds of a specific road segmentat a same moment as a road segment speed of the road segment at the samemoment in the future. Consequently, a prediction result of the roadsegment speed has a relatively large error.

Therefore, the embodiments of this application provide methods ofimproving a road segment speed prediction method. Factors affectingaccuracy of road segment speed prediction are obtained through researchand analysis, a road segment speed prediction model is trained accordingto the factors, and road segment speed prediction with higher accuracyis achieved based on the trained road segment speed prediction model.

The following describes the technical solutions in the embodiments ofthis application with reference to the accompanying drawings in theembodiments of this application. The described embodiments are someembodiments of this application rather than all of the embodiments. Allother embodiments obtained by a person of ordinary skill in the artbased on the embodiments of this application fall within the protectionscope of this application.

During prediction of a road segment speed of a road segment at a futuremoment, most major factors affecting the accuracy of road segment speedprediction include a road segment speed at a moment that is apredetermined time difference before a future moment, and a road segmentspeed at each set moment/time point and a historical road segment speedmean value before the moment.

In some examples, a future moment is a next minute, and factorsaffecting accuracy of road segment speed prediction of the next minuteinclude a road segment speed at a current moment, a road segment speedin each minute in 10 minutes before the current moment, and a historicalroad segment speed mean value.

According to the embodiments of this application, the road segment speedprediction model may be trained by using at least the foregoing factors,and road segment speed prediction with higher accuracy is achieved basedon the trained road segment speed prediction model.

FIG. 1 is a flowchart of a road segment speed prediction methodaccording to an embodiment of this application. The road segment speedprediction method may be applied to a server. The server may be anavigation server having a traffic condition-based route calculationfunction or may be a serving device that is configured to implement roadsegment speed prediction individually and that can interact with anavigation server. Referring to FIG. 1, the road segment speedprediction method provided according to an embodiment of thisapplication may include:

At step S100, a road segment moving speed on a target road segment isdetermined/obtained at a first moment/time point.

The target road segment may be considered as a road segment on whichroad segment speed prediction currently needs to be performed. Thetarget road segment may be any road segment in a road network. In anembodiment of this application, road segment speed prediction may beperformed on any specified road segment in a road network. In someexamples, a road segment may be understood as a transportation routebetween two nodes in the road network, and the two nodes in the roadnetwork may be set according to an actual situation. In an embodiment,one minute may be used as a unit of a moment, and a first moment may bea moment of a specific minute. For example, the first moment may be acurrent minute. In other embodiments of this application, two minutes,three minutes, or the like may alternatively be used as a unit of themoment. Specific selection of the unit of the moment may be setaccording to an actual situation.

In an embodiment, the first moment may be a moment that has arrived, forexample, a current moment. A mean value of or average vehicle speeds ofa target road segment at the first moment may be computed to determine aroad segment speed of the target road segment at the first moment.

In an embodiment, the first moment may be a future moment, which is amoment that has not arrived. The road segment speed of the target roadsegment at the first moment may be predicted by using the road segmentspeed prediction method provided by the embodiments of this application.After predicting the road segment speed of the target road segment atthe first moment, the predicted road segment speed of the target roadsegment at the first moment can be used to predict a road segment speedof the target road segment at a future moment posterior to the firstmoment.

At step S110, a plurality of road segment moving speeds on the targetroad segment at each set moment before the first moment and a historicalroad segment speed mean value on the target road segment before thefirst moment are determined/obtained.

In an embodiment, each set moment before the first moment may be eachmoment within a set time range before the first moment. In someexamples, when a set time range is 10 minutes, each set moment beforethe first moment may be each minute within 10 minutes before the firstmoment (i.e., a 10^(th) minute to 1^(st) minute before the firstmoment). Correspondingly, a road segment speed of the target roadsegment in each minute within 10 minutes before the first moment and ahistorical road segment speed mean value of the target road segmentbefore the first moment may be determined.

In an embodiment, a road segment speed of the target road segment at aspecific moment before the first moment may be determined by computing avehicle speed mean value at the moment before the first moment. Forexample, a road segment speed of the target road segment in the 10^(th)minute before the first moment may be determined by computing a vehiclespeed mean value in the 10^(th) minute before the first moment. However,when a specific moment before the first moment has not arrived, a roadsegment speed of the target road segment at the moment before the firstmoment may be predicted by using the road segment speed predictionmethod provided by the embodiments of this application.

In an embodiment, a historical road segment speed mean value of thetarget road segment at a specific moment before the first moment may bedetermined by using a mean value of historical road segment speeds ofthe target road segment at the moment in a set time limit/range. The settime limit may include at least one time cycle, and the one time cyclemay include a plurality of moments.

For example, the set time limit may be one month and the time cycle maybe one day. Therefore, a historical road segment speed mean value of thetarget road segment at a specific moment before the first moment may beobtained by collecting a historical road segment speed of the targetroad segment at the moment each day in one month and computing a meanvalue of the collected historical road segment speeds of the target roadsegment.

At step S120, a road segment speed prediction feature of the target roadsegment at a second moment/time point is determined at least accordingto the road segment moving speed of the target road segment at the firstmoment, the plurality of road segment moving speeds on the target roadsegment in each set time point before the first moment, and thehistorical road segment speed mean value of the target road segmentbefore the first moment. The second moment may be a future momentposterior to the first moment and having a predetermined time differencefrom the first moment.

When predicting a road segment speed at the second moment, factorsaffecting the accuracy of a road segment speed prediction result of thesecond moment may at least include: the road segment speed of the targetroad segment at the first moment, the road segment speed of the targetroad segment at each set moment/time point before the first moment, andthe historical road segment speed mean value of the target road segmentbefore the first moment. In an embodiment of this application, a roadsegment speed prediction feature may be determined by using at least thefactors, which are input into a pre-trained road segment speedprediction model to predict a road segment speed at the second moment inthe future.

In an embodiment, the second moment may be considered as a future momentthat has not arrived and that is posterior to the first moment, and atime difference between the second moment and the first moment is apredetermined time difference. In an example, the predetermined timedifference is one minute and the second moment may be a next minute ofthe first moment.

In an embodiment, when a current moment is used as the first moment, thesecond moment may be, for example, a next minute of the current moment.The second moment may alternatively be the next two minutes of thecurrent moment or the like, may be specifically set according to anactual situation, and may be achieved by adjusting a training featureused during subsequent training of a road segment speed predictionmodel.

In an embodiment of this application, the road segment speed of thetarget road segment at the second moment in the future may be obtainedby predicting the road segment speed prediction feature of the targetroad segment at the second moment. Moreover, the road segment speedprediction feature of the target road segment at the second moment maybe determined at least according to the road segment speed of the targetroad segment at the first moment, the road segment speed of the targetroad segment at each set time point before the first moment, and thehistorical road segment speed mean value of the target road segmentbefore the first moment. In addition, the first moment is prior to thesecond moment.

In an embodiment, when the first moment is a current moment, and eachset time point before the first moment is each minute in 10 minutesbefore the current moment, the road segment speed prediction feature ofthe target road segment at the second moment in the future may at leastinclude the contents in Table 1 below. The contents of Table 1 may beconsidered as an example of major factors affecting impact accuracy ofroad segment speed prediction.

TABLE 1 Current road Historical road segment speed mean segment Roadsegment speed in 10 minutes value in 10 minutes before the currentspeeds before the current moment moment Road Road Road . . . RoadHistorical Historical . . . Historical segment segment segment segmentroad road road speeds at a speed in speed in speed in segment segmentsegment current a 10^(th) a 9^(th) a 1^(st) speed speed speed momentminute minute minute mean mean mean before before before value in avalue in a value in a 10^(th) 9^(th) minute 1^(st) minute minute beforebefore before

In an embodiment, the contents in Table 1 may be referred to as a speedfeature. The speed feature may be the most important factor affectingaccuracy of road segment speed prediction.

In an embodiment, the road segment speed prediction feature of thetarget road segment at the second moment in the future described aboveis an example. Another dimension/factor may be added to the road segmentspeed prediction feature. For example, a road segment feature of thetarget road segment may be added to the road segment speed predictionfeature, and the road segment feature of the target road segment mayinclude: a road segment length, a road segment level (e.g., a high speedroad, an urban expressway, a provincial road, a county road, a villageroad, and a small road), a road segment speed limit, and the like of thetarget road segment.

Table 1 describes that the first moment is a current moment, but doesnot exclude a situation that the first moment is a moment that is in thefuture and that is prior to the second moment.

At step S130, a road segment moving speed of the target road segment atthe second moment is predicted according to the road segment speedprediction feature and a pre-trained road segment speed predictionmodel.

In an embodiment, the road segment speed prediction feature may be usedas an input of the pre-trained road segment speed prediction model, andthe pre-trained road segment speed prediction model predicts the roadsegment speed of the target road segment at the second moment.

In an embodiment of this application, pre-training may be performedbased on a machine learning algorithm to obtain a road segment speedprediction model. The road segment speed prediction model may be used topredict, when one moment is specified, a road segment speed of thetarget road segment at a later moment having a predetermined timedifference from the moment. For example, after the moment is specified,a road segment speed in a next minute of the moment may be predictedusing the road segment speed prediction model.

In an embodiment, during training of the road segment speed predictionmodel, a road segment speed prediction model may be obtained based onthe foregoing factors affecting accuracy of a road segment speedprediction result. Specifically, a road segment speed prediction modelmay be obtained by training using a machine learning algorithm accordingto at least the road segment speed prediction training feature of thetarget road segment at each time point in a set time limit. In addition,a road segment speed prediction training feature of the target roadsegment at one moment in a set time limit may be determined according toat least a road segment speed of the target road segment at the moment,a road segment speed of the target road segment at each set momentbefore the moment, and a historical road segment speed mean value of thetarget road segment before the moment.

In an embodiment, the road segment speed prediction model may beobtained by training by using a Gradient Boosting Decision Tree (GBDT)machine learning algorithm. Correspondingly, a model form of the roadsegment speed prediction model may be a GBDT model. It is to be notedthat the GBDT is a machine learning algorithm for regression, thealgorithm includes a plurality of decision trees, and conclusions of allthe trees are accumulated as a final result. After a target function isconverted, the algorithm may alternatively be used for classification orsorting. In some examples, the GBDT model may be used as a model form ofthe road segment speed prediction model, and a relatively good effectmay be produced in resolving various regression problems with the helpof a prediction capability of the GBDT model. In addition, a GBDTtechnology-based extreme gradient boosting library (e.g., xgBoost, whichis a c++ implementation of gradient boosting, and has characteristics ofa high speed and a good fitting effect) can ensure and boost a modeltraining effect, which is helpful in subsequent engineerization. TheGBDT has a strong generalization capability, and after the model isobtained by training, time costs of feature calculation to obtain aresultant value are relatively low because the feature calculationinvolves only simple comparison and accumulation operations.

In the road segment speed prediction method provided in an embodiment ofthis application, a road segment speed prediction model may be obtainedby training using a machine learning algorithm according to a roadsegment speed prediction training feature of the target road segment ateach time point in a set time limit, and the road segment speedprediction training feature of the target road segment at a moment in aset time limit may be determined according to at least a road segmentspeed of the target road segment at the moment, a road segment speed ofthe target road segment at each set time point before the moment, and ahistorical road segment speed mean value of the target road segmentbefore the moment. Therefore, when a road segment speed of the targetroad segment at a second moment, which is in the future and has apredetermined time difference from the first moment, needs to bepredicted, a road segment speed of the target road segment at the firstmoment, a road segment speed of the target road segment at each set timepoint before the first moment, and a historical road segment speed meanvalue of the target road segment before the first moment may bedetermined, to determine a corresponding road segment speed predictionfeature of the target road segment at the second moment. Further, theroad segment speed of the target road segment at the second moment ispredicted according to the road segment speed prediction feature and thepre-trained road segment speed prediction model, so that when a targetroad segment of the road segment speed at a specific moment isdetermined, a road segment speed of the target road segment at a futuremoment having a predetermined time difference from the moment ispredicted.

In an embodiment, factors affecting accuracy of road segment speedprediction are considered, when the road segment speed of the targetroad segment at the first moment is determined, the road segment speedat the second moment that is in the future and that has a predeterminedtime difference from the first moment is determined by using the roadsegment speed prediction model pre-trained by using the machine learningalgorithm, and accurate prediction of the road segment speed may bepredicted with the help of characteristics of high availability and highaccuracy of the road segment speed prediction model trained by using themachine learning algorithm, so that controllability of an error of aroad segment speed prediction result is improved, and accuracy of theroad segment speed prediction result is improved.

In an embodiment, a process of obtaining a road segment speed predictionmodel by pre-training is described below, and FIG. 2 shows an exemplarytraining procedure of a road segment speed prediction model.

At step S200, a road segment speed prediction training feature of thetarget road segment is determined at each time point of each time cycleof a set time limit to obtain a plurality of pieces of sample data.

In an embodiment, one piece of sample data may represent a road segmentspeed prediction training feature of the target road segment at onemoment of one time cycle of the set time limit. The road segment speedprediction training feature of the target road segment at one moment ofone time cycle of the set time limit may at least include: a roadsegment speed of the target road segment at the one moment of the onetime cycle of the set time limit and a road segment speed of the targetroad segment at each set time point before the one moment and historicalroad segment speed mean value of the target road segment before the onemoment.

In an embodiment, the set time limit may include at least one timecycle, and the one time cycle may include a plurality of moments.

In an embodiment, the set time limit may be a time limit such as onemonth or half a year, one day may be one time cycle, and each minute inone day may be understood as each set time point in one time cycle.

In an embodiment, the set time limit may be one month, the time cyclemay be one day, and the set time point may be a minute. Correspondingly,one piece of sample data may represent a road segment speed predictiontraining feature of the target road segment in a specific minute of aspecific day of a specific month, so that for the target road segment, aroad segment speed prediction training feature of each minute of eachday in one month may be collected to obtain a plurality of pieces ofsample data.

Specific forms of the set time limit, the time cycle, and the moment mayalternatively be set according to an actual situation.

In an embodiment, the time cycle may be a date of a set weekday type(when the set weekday type is Monday, each Monday is used as a timecycle, a road segment speed prediction training feature of each roadsegment at each time point on each Monday of a set time limit, and aroad segment speed prediction model may be correspondingly obtained bytraining. Therefore, a road segment speed at a moment on Monday may bepredicted. Alternatively, the set weekday type may include that: Mondayis a weekday type, Tuesday to Thursday are a weekday type, Friday is aweekday type, and Saturday to Sunday are a weekday type.Correspondingly, a road segment speed prediction training feature ofeach road segment at each time point may be collected, for example, oneach Tuesday to Thursday in a set time limit, and a road segment speedprediction model is obtained by training. Therefore, a road segmentspeed at a moment on Tuesday to Thursday can be predicted. In anotherexample, a road segment speed prediction training feature of each roadsegment at each time point may be collected on each Friday in a set timelimit, and a road segment speed prediction model is obtained bytraining. Therefore, a road segment speed at a moment on Friday can bepredicted. In another example, a road segment speed prediction trainingfeature of each road segment at each time point may be collected on eachSaturday to Sunday in a set time limit, and a road segment speedprediction model is obtained by training. Therefore, a road segmentspeed at a moment on Saturday to Sunday can be predicted.

At step S210, the road segment speed prediction model is determined bytraining according to a machine learning algorithm and the plurality ofpieces of sample data.

In an embodiment, the GBDT machine learning algorithm may be selected asthe machine learning algorithm. Correspondingly, the road segment speedprediction model obtained by training may be a road segment speedprediction model in a GBDT model form.

In an embodiment, in a process of training a road segment speedprediction model, selection of a speed prediction training feature isparticularly crucial, and the exemplary speed prediction trainingfeatures are described below.

Using a road segment speed prediction training feature of a target roadsegment at a moment of one time cycle of a set time limit as an example,in a first implementation, the road segment speed prediction trainingfeatures at the moment may at least include:

a road segment speed of the target road segment at the moment; and

a road segment speed of the target road segment at each set time pointbefore the moment and a historical road segment speed mean value of thetarget road segment before the moment.

A difference between the speed prediction training features in Table 1and the above-described exemplary speed prediction training features isthat during training of the road segment speed prediction model, acorresponding content of Table 1 needs to be determined for each timepoint of each time cycle of a set time limit.

In a second implementation, when a road segment speed of a road segmentat a future moment is predicted, in addition to the road segment speedat a moment that is a predetermined time difference before the futuremoment and a road segment speed at each set time point and thehistorical road segment speed mean value before the moment, the factorsaffecting accuracy of road segment speed prediction may further include:a road segment feature of the target road segment, a previous speedclustering interval/range and a next speed clustering interval of aspeed clustering interval of the road segment speed of the target roadsegment at one moment of one time cycle, a time of the one moment, atime at which the target road segment enters the speed clusteringinterval of the road segment speed, and a duration during which thetarget road segment is in the speed clustering interval of the roadsegment speed.

Therefore, based on the above-described factors, the road segment speedprediction training features of the target road segment at one moment ofone time cycle of the set time limit may include:

a road segment speed of the target road segment at the moment;

a road segment speed of the target road segment at each set time pointbefore the moment and a historical road segment speed mean value of thetarget road segment before the moment;

a road segment feature of the target road segment, the road segmentfeature including a road segment length, a road segment level e.g., ahigh speed road, an urban expressway, a provincial road, a county road,a village road, and a small road), a road segment speed limit, and thelike;

a speed clustering interval of the road segment speed of the target roadsegment at the moment in a plurality of pre-divided speed clusteringintervals, and a previous speed clustering interval and a next speedclustering interval of the speed clustering interval; and

a time of the moment, a time at which the target road segment enters thespeed clustering interval of the road segment speed, and a durationduring which the target road segment is in the speed clustering intervalof the road segment speed.

In an example, when each set time point before a specific moment is eachminute in 10 minutes before the moment, the road segment speedprediction training feature of the target road segment at one moment ofone time cycle of the set time limit may include the contents in Table 2below. The contents of Table 2 may be considered as another example offactors affecting impact accuracy of road segment speed prediction.

TABLE 2 Road segment speeds at one moment of one time Road segment speedof the moment cycle of a set time limit Road segment speed in a 10^(th)minute before Road segment speeds in Road segment speed in a 9^(th)minute before 10 minutes before the . . . moment Road segment speed in a1^(st) minute before Historical road segment speed mean value in aHistorical road segment 10^(th) minute before speed mean values in 10Historical road segment speed mean value in a minutes before the 9^(th)minute before moment . . . Historical road segment speed mean value in a1^(st) minute before Time of the moment Time features Time of entering atarget speed clustering interval Duration of being in a target speedclustering interval Previous speed clustering interval Clusteringfeatures Target speed clustering interval of the moment Next speedclustering interval Length of the road segment Road features Roadsegment level Road segment speed limit

In an embodiment, in the contents of Table 2, the contents related tothe road segment speed at one moment of one time cycle of a set timelimit, the road segment speed in 10 minutes before the moment, and thehistorical road segment speed mean value in 10 minutes before the momentare related to the speed features.

In an embodiment, a plurality of speed clustering intervals may bepre-divided, and a speed clustering interval includes historical roadsegment speed mean values of a target road segment at a plurality ofmoments that are close to each other in terms of value. In addition, aspeed clustering interval includes a time period dimension and a roadsegment speed dimension. Therefore, when determining a target speedclustering interval of a road segment speed of the target road segmentat a specific moment, a speed clustering interval having a time perioddimension matching the specific moment may be determined as the speedclustering interval of the road segment speed of the target road segmentat the moment.

In an embodiment, when the speed clustering intervals are divided, ahistorical road segment speed mean value of the target road segment ateach moment may be determined. The historical road segment speed meanvalue of the target road segment at each moment is clustered a pluralityof times until a center (e.g., an average or mean speed) of each speedclustering interval is the same as a center of each speed clusteringinterval of a previous cluster, to obtain k speed clustering intervals.In some examples, k may be a set value.

FIG. 3 shows a flowchart of an exemplary division of speed clusteringintervals.

At step S300, a historical road segment speed mean value of a targetroad segment is determined at each moment.

In an embodiment, the historical road segment speed mean value of thetarget road segment at one moment may be determined using a mean valueof historical road segment speeds of the target road segment at themoment in respective time cycles in a set time limit. For example, in aset time limit, historical road segment speeds of the target roadsegment at the moment in respective time cycles may be determined, andthen, the historical road segment speeds of the target road segment atthe moment in respective time cycles are averaged to obtain a historicalroad segment speed mean value of the road segment at the moment.

For example, for a historical road segment speed mean value of thetarget road segment at a specific time (e.g., 10:10), historical roadsegment speeds of the target road segment at the specific time in eachday of one month may be obtained, and the historical road segment speedsof the target road segment are averaged to obtain a historical roadsegment speed mean value of the road segment in the minute.

At step S310, historical road segment speed mean values at k moments arerandomly selected as initial centers of k speed clustering intervals.

In an embodiment, k is a set value and may be set according to an actualsituation. After the set value k is determined, the k moments may berandomly selected from all moments. Further, the historical road segmentspeed mean values of the k moments can be used as initial centers of thek speed clustering intervals, so that each initial center may have acorresponding time and a corresponding historical road segment speedmean value.

In an embodiment, the selected k moments may be k evenly distributedmoments. For example, adjacent moments in the k moments have a same timeinterval.

At step S320, for a historical road segment speed mean value at aremaining moment/time point, determine at least one of the initialcenters temporally connected to the remaining moment. A dissimilarity isdetermined between the historical road segment speed mean value at theremaining moment and each temporally connected initial center, and thehistorical road segment speed mean value at the remaining moment isclustered into a speed clustering interval corresponding to a temporallyconnected initial center that has a lowest dissimilarity, so that aninitial speed clustering interval is obtained.

In an embodiment, for a historical road segment speed mean value at aremaining moment, at least one of the initial centers temporallyconnected to the remaining moment may be determined. Each initial centerof the pre-divided k speed clustering intervals has a road segment speedand a time, and for a historical road segment speed mean value at aremaining moment, an initial center temporally connected to theremaining moment may be determined. The temporally connected initialcenter may be temporally prior to the remaining moment or may beposterior to the remaining moment, so that dissimilarity calculation isperformed on the historical road segment speed mean value of theremaining moment and each temporally connected initial center, tocluster the historical road segment speed mean value of the remainingmoment to a speed clustering interval corresponding to a temporallyconnected initial center that has a lowest dissimilarity.

Therefore, such processing is performed on a historical road segmentspeed mean value at each remaining moment, so that an initial speedclustering interval after historical road segment speed mean values atall moments are clustered may be determined.

In an embodiment, the k initial centers include: 9:10, 10:10, and 11:10,and for a time point of 9:50, 9:10 and 10:10 in the k initial centersmay be temporally connected to the time point of 9:50. Because there is10:10 before 11:10, 11:10 may not be considered to be temporallyconnected to the time point of 9:50.

In an embodiment, the remaining moment may be a moment that remains inone time cycle after k moments/initial centers are removed. For example,a time cycle is one day, k moments are 10:10 and 11:10, and theremaining moments may be moments of remaining integer minutes at momentsof all integer minutes in one day after 10:10 and 11:10 are removed.

At step S330, a center of each initial speed clustering interval isdetermined, and a historical road segment speed mean value at eachmoment is re-clustered according to a dissimilarity between thehistorical road segment speed mean value at each moment and eachdetermined center, to obtain a re-clustered speed clustering interval.

Specifically, after the initial speed clustering interval is obtained, acenter of each initial speed clustering interval may be determinedaccording to historical road segment speed mean values clustered by eachinitial speed clustering interval. Therefore, for a historical roadsegment speed mean value at any moment, a dissimilarity between thehistorical road segment speed mean value at the moment and a center ofeach temporally connected initial speed clustering interval isdetermined, and the historical road segment speed mean value of themoment is clustered into a speed clustering interval corresponding to acenter that has a lowest dissimilarity and that is temporally connectedthereto. Processing is performed on a historical road segment speed meanvalue at each moment in this way, so that the historical road segmentspeed mean value at each moment may be re-clustered, to obtain are-clustered speed clustering interval.

At step S340, the historical road segment speed at each moment isre-clustered by using a center of each speed clustering interval ofprevious clustering until a center of each re-clustered speed clusteringinterval is the same as the center of each speed clustering interval ofa previous clustering.

In an embodiment, after a speed clustering result of re-clustering isobtained, a historical road segment speed mean value at each moment maybe re-clustered again by using a speed clustering result of previousre-clustering. In some examples, a clustering policy/process may beunchanged, that is, a historical road segment speed mean value at amoment is clustered to a speed clustering result corresponding to acenter that has a lowest dissimilarity and that is temporally connectedthereto, which is cycled/repeated until a center of each speedclustering interval after re-clustering is the same as a center of aspeed clustering interval of previous clustering.

After k speed clustering intervals are divided, each speed clusteringinterval may include two dimensions, namely, a time period dimension anda road segment speed dimension, so that for a road segment speed targetroad segment at a specific moment, a speed clustering interval whosetime period dimension matches the moment may be determined, to obtain aspeed clustering interval of a road segment speed of a target roadsegment at the moment.

Moreover, k speed clustering intervals may be ranked according to a timesequence of the k speed clustering intervals, so as to determine theprevious speed clustering interval and a next speed clustering intervalof the target speed clustering interval.

Further, for a specific moment, a time at which the target road segmententers the target speed clustering interval and a duration during whichthe target road segment is in the target speed clustering intervalbefore the time may be determined. For example, a speed clusteringinterval of the target road segment is determined moment by momentbefore the moment, a time range of continuously entering the targetspeed clustering interval at the moment is determined, a starting timeof the time the range is used as a time at which the target road segmententers the target speed clustering interval before the moment, and aduration of the time range is used as a time during which the targetroad segment is in the target speed clustering interval before themoment.

FIG. 4 shows an exemplary training procedure of a road segment speedprediction model.

At step S400, for a moment of a time cycle of a time limit, a roadsegment speed of a target road segment is determined at the moment, aroad segment speed of the target road segment at each moment before themoment, a historical road segment speed mean value of the target roadsegment before the moment, a speed clustering interval of the roadsegment speed at the moment, a previous speed clustering interval and anext clustering interval thereof, a time of the moment, a time at whichthe target road segment enters the speed clustering interval of the roadsegment speed, a duration during which target road segment is in thespeed clustering interval of the road segment speed, and a read featureof the target road segment to obtain a road speed prediction trainingfeature of the target road segment at this moment to determine a roadsegment speed prediction training feature of the target road segment ateach moment of each time cycle of a set time limit, to obtain aplurality of pieces of sample data.

At step S410, a road segment speed prediction model in a GBDT model formis determined by training according to a GBDT machine learning algorithmand the plurality of pieces of sample data.

It is to be noted that after the foregoing content used as the roadsegment speed prediction training feature is checked by using relevance,the speed feature in the road segment speed prediction training featurehas a largest impact on accuracy of road segment speed prediction. Thatis, the speed feature is the most important factor affecting accuracy ofroad segment speed prediction. However, the time features, theclustering features, and the road features also greatly affect theaccuracy of the road segment speed prediction. Therefore,comprehensively using the foregoing contents as the road segment speedprediction training feature may improve prediction accuracy of the roadsegment speed prediction model.

Based on the road segment speed prediction model trained by using themethod shown in FIG. 4, a road segment speed prediction method providedin an embodiment of this application may be shown in FIG. 5.

At step S500, a speed of a target road segment is determined at a firstmoment.

At step S510, a road segment speed of the target road segment isdetermined at each set moment before the first moment and a historicalroad segment speed mean value of the target road segment before thefirst moment.

At step S520, a target speed clustering interval of the road segmentspeed of the target road segment at the first moment, a previous speedclustering interval and a next speed clustering interval of the targetspeed clustering interval, a time at which the target road segmententers the target speed clustering interval, and a duration during whichthe target road segment is in the target speed clustering interval aredetermined.

In an embodiment, the order of step S520 and step S510 can be switched.

At step S530, a road segment speed prediction feature of the target roadsegment at a second moment is determined according to the road segmentspeed of the target road segment at the first moment, the road segmentspeed of the target road segment at each set moment before the firstmoment, the historical road segment speed mean value of the target roadsegment before the first moment, the target speed clustering interval ofthe road segment speed of the target road segment at the first moment,the previous speed clustering interval and the next speed clusteringinterval of the target speed clustering interval, the time at which thetarget road segment enters the target speed clustering interval, theduration during which the target road segment is in the target speedclustering interval, a time of the first moment, and a road segmentfeature of the target road segment.

In an embodiment, as compared with a situation that the road segmentspeed prediction feature of the target road segment at the second momentincludes the road segment speed of the target road segment at the firstmoment, the road segment speed of the target road segment at each setmoment before the first moment, and the historical road segment speedmean value of the target road segment before the first moment, the roadsegment speed prediction feature of the target road segment at thesecond moment may further include: the target speed clustering intervalof the road segment speed of the target road segment at the firstmoment, the previous speed clustering interval and the next speedclustering interval of the target speed clustering interval, the time atwhich the target road segment enters the target speed clusteringinterval, the duration during which the target road segment is in thetarget speed clustering interval, the time of the first moment, and theroad segment feature of the target road segment.

At step S540, a road segment speed of the target road segment at thesecond moment is predicted according to the road segment speedprediction feature and a pre-trained road segment speed predictionmodel.

In an embodiment, when the first moment is a current moment, an exampleof determining a road segment speed prediction feature at a secondmoment in the future based on the first moment is shown in FIG. 6. Anexemplary content of the road segment speed prediction feature shown inFIG. 6 may be described as follows.

52 53 55 56 56 56 56 55 55 54 0.0166666667 48 48 49 50 50 50 50 49 49 5150.95 52.45 52.85 53.1578947368421 53.5 53.8 54.25 55.0 56.7553.61116997664677 1.199860668171932 1 505 0.0000000000 5.0600000000 50649.68421052631579 50.31578947368421 50.526315789473685 50.7894736842105351.1578947368421 51.578947368421055 51.78947368421053 52.2105263157894752.68421052631579 51.190430622009565 0.5916384698152513 54.25 55.15 55.456.

In an example, one month may be used as a sample data collection timelimit, a road segment speed of the target road segment in each minute ofeach day in one month is connected, and a historical road segment speedmean value of the target road segment in each minute of one day iscalculated. Meanwhile, a plurality of speed clustering intervals isdivided according to the historical road segment speed mean value of thetarget road segment in each minute.

For each minute of each day in one month, a road segment speedprediction training feature of the target road segment is determined.The road segment speed prediction training feature of the target roadsegment in a specific minute of a specific day in one month may include:a road segment speed of the target road segment in the minute, a roadsegment speed of the target road segment in each minute in 10 minutesbefore the minute, a historical road segment speed mean value of thetarget road segment before the minute, a speed clustering interval ofthe road segment speed of the target road segment in the minute, aprevious speed clustering interval and a next speed clustering interval,a specific time of the minute, a time at which the target road segmententers the speed clustering interval, and a duration during which thetarget road segment is in the speed clustering interval, and a roadsegment feature of the target road segment.

A road segment speed prediction training feature of the target roadsegment in a specific minute of a specific day in one month is used asone piece of sample data, so as to obtain a plurality of pieces ofsample data.

A road segment speed prediction model in a GBDT model form is obtainedby training according to a GBDT machine learning algorithm by using theplurality of pieces of sample data as a training input.

When a road segment speed of the target road segment in a next minuteneeds to be predicted in a current minute, a road segment speedprediction feature of the target road segment in the next minute of thecurrent minute is determined, and the road segment speed predictionfeature includes: a road segment speed of the target road segment in thecurrent minute, a road segment speed of the target road segment in eachminute in 10 minutes before the current minute, a historical roadsegment speed mean value of the target road segment before the currentminute, a target speed clustering interval of the road segment speed ofthe target road segment in the current minute, a previous speedclustering interval and a next speed clustering interval of the targetspeed clustering interval, a specific time of the current minute, a timeat which the target road segment enters the target speed clusteringinterval, and a duration during which the target road segment is in thetarget speed clustering interval, and a road segment feature of thetarget road segment.

The road segment speed prediction feature of the target road segment inthe next minute of the current minute is used as an input of the roadsegment speed prediction model, to predict a road segment speed of thetarget road segment in the next minute of the current minute.

In an embodiment, when the road segment speed prediction model istrained, for the time cycle, each day does not need to be selected.Different time cycles have relatively large road segment speed changesand distribution differences. For example, a speed in a Monday morningis different from a speed in a Sunday morning, and a change from a speedafter work on a Friday to a speed on a Saturday to a speed on a Sundayis also relatively large. Therefore, when the same processing isperformed, a prediction result is greatly interfered with and affected.Therefore, in an embodiment of this application, time cycles of dateswith different weekday types may be distinguished, and road segmentspeed prediction models of different weekday types are respectivelytrained by using sample data of time cycles of dates with differentweekday types. For example, road segment speed prediction modelscorresponding to Monday, Tuesday to Thursday, Friday, and Saturday toSunday are respectively trained. A road segment speed prediction modelof a weekday type may correspondingly predict a road segment speed ofthe weekday type at a specific future moment. For example, a roadsegment speed prediction model of Monday may predict a road segmentspeed at the moment on Monday, a road segment speed prediction model ofTuesday to Thursday may predict a road segment speed at the moment onTuesday to Thursday, and so on.

In an embodiment, in a process of training a road segment speedprediction model, to make a prediction result of the road segment speedprediction model more accurate, sample data may alternatively beoptimized. Since a road network has huge data, there are situations suchas road segment noise and a small quantity of samples, leading to aphenomenon that a road segment is not covered or a small quantity ofroad segments are covered. Consequently, a model obtained by trainingcannot resolve a problem of this type of road segments, and therefore,generate a problem of an excess prediction error. Therefore, in apossible implementation of this embodiment of this application, for onepiece of sample data, a road segment speed at a corresponding moment inthe sample data predicted by the road segment speed prediction model maybe compared with a real road segment speed at the corresponding momentin the sample data, and when a difference after comparison is greaterthan a difference threshold, the sample data is determined to be anoise. Smoothing may be performed on the noise by using a Kalman filter,so that a road segment speed predicted by the road segment speedprediction model approximates a real road segment speed.

For example, based on sample data, after a road segment speed at aspecific moment is predicted by the road segment speed prediction model,a real road segment speed in the moment in the sample data may becompared with the predicted road segment speed, and when a comparisondifference is greater than a difference threshold, the sample data isdetermined to be a noise. Smoothing may be performed on the noise byusing a Kalman filter, so that a road segment speed predicted by theroad segment speed prediction model that is finally obtained by trainingapproximates a real road segment speed.

The Kalman filter uses the minimum mean square error as an optimalcriterion to seek for a recursive estimation algorithm. Simply speaking,within a range of sample data, when a difference between a predictedroad segment speed and a real road segment speed in the sample data isgreater than a difference threshold of dynamic adjustment, the Kalmanfilter is used to enable module calculation to make a final resultapproach the real road segment speed. It is likely that smoothing isperformed because the noise causes an excess prediction error.

It is to be noted that a road segment speed of a road segment hasspecific regularity. For example, after a typical road segment (e.g., ahigh speed road, an urban expressway, a provincial road, a county road,a village road, and a small road) is selected, a road segment speed ofthe typical road segment in each minute on each Tuesday to Thursday ofone month is captured, and a road segment speed mean value of thetypical road segment in each minute of one month is obtained, the roadsegment speed mean value of the typical road segment in each minute ofone month is compared with a road segment speed of the typical roadsegment in each minute of a specific day, as shown in FIG. 7. It may befound that the road segment speed of the typical road segment in eachminute of the specific day approximates the obtained road segment speedmean value in each minute. In addition, in view of FIG. 7, a trafficflow and a road segment speed do not have an obvious relevantcharacteristic.

In addition, after a road segment speed prediction model is trained byselecting a road segment speed training feature of the typical roadsegment in each minute of each day in one month as sample data, a roadsegment speed in a specific minute predicted by the road segment speedprediction model is compared with a real road segment speed in theminute in the sample data. FIG. 8 shows that the predicted speed canbetter fit a monthly mean speed of the typical road segment.

In an embodiment of this application, when the road segment speed of thetarget road segment at the first moment is determined, the road segmentspeed at the second moment that is in the future and that has apredetermined time difference from the first moment is determined byusing the road segment speed prediction model. The road segment speedprediction model may be pre-trained by using the machine learningalgorithm, and accurate prediction of the road segment speed may bepredicted with the help of characteristics of high availability and highaccuracy of the road segment speed prediction model trained by using themachine learning algorithm, so that controllability of an error of aroad segment speed prediction result is improved, and accuracy of theroad segment speed prediction result is improved.

In an embodiment, based on the road segment speed prediction methodsdescribed above, after a road segment speed of the target road segmentat a second moment that is in the feature is predicted, the predictedroad segment speed of the target road segment at the second moment thatis in the feature is associated with the target road segment presentedon a map, so as to present the road segment speed of the target roadsegment at the second moment that is in the feature while presenting thetarget road segment on the map.

Specifically, each road segment presented on a map may have a roadsegment identifier, and one road segment presented on the mapcorresponds to one unique road segment identifier, so that a target roadsegment may be determined according to a road segment identifier of thetarget road segment from a plurality of road segments presented on themap, and the predicted road segment speed of the target road segment atthe second moment that is in the future is associated with the targetroad segment presented on the map, so that when the target road segmentis presented on the map, the road segment speed of the target roadsegment at the second moment that is in the feature may be presented.

In an embodiment, the road segment speed of the target road segment at afuture moment presented on the map may be updated minute by minute. Forexample, for the target road segment, when a current minute arrives, aroad segment speed of the target road segment in a next minute may bepredicted by using the road segment speed prediction method provided inthe embodiments of this application, so as to update the road segmentspeed of the target road segment at a future moment presented on the mapminute by minute.

In an embodiment, a road segment weight of the target road segment atthe second moment that is in the future may be further calculated byusing the predicted road segment speed of the target road segment at thesecond moment. The road segment weight may be used to estimate trafficcondition costs reflecting a traffic condition, so as to select anadvantageous road segment from a road network, to provide a service fortraffic condition-based route calculation of navigation.

It is to be noted that currently a road segment weight can be calculatedby using a real-time road segment speed, but a road segment speedchanges with time. When a road segment speed at this moment is used forroute planning, after a user travels for a period of time and approachesan end road segment, a speed of the road segment has changed, and inthis case, both a traffic condition and a road segment speed deviatefrom the situations at a starting point. In this case, still using aninitial value as a road segment speed for route calculation may not beaccurate.

As shown in FIG. 9, a starting point is A, a point B is an end point, aregion C is passed through, and at a current moment, a road segmentspeed of an upper part of the region C is 60 km/h, and a road segmentspeed of a lower part of the region C is 10 km/h. After 30 minutes, whena vehicle enters the region C, the road segment speed of the lower parthas been increased to 60 km/h, the road segment speed of the upper parthas been decreased to 30 km/h. Therefore, it appears that there istraffic congestion in the upper part of the region C. During the routecalculation, it is improper to use a real-time road segment speed, andusing a predicted future road segment speed is more proper.

After the road segment speed of the target road segment at the secondmoment that is in the future is predicted, a road segment length of thetarget road segment may be divided by the predicted road segment speed,to obtain a road segment weight of the target road segment at the secondmoment in the future. In an embodiment of this application, a roadsegment length corresponding to a road segment identifier of each roadsegment may be recorded, so that a road segment length of the targetroad segment may be determined according to a road segment identifier ofthe target road segment.

In an embodiment, the calculated weight may be fine-tuned through someadjustment policies (e.g., a path weight, main and side road weights,and turning costs). In addition, for improving the accuracy of a weightand efficiency of a route calculation service, offline static weightprocessing may be performed. The fine-tuned road segment weighted may becached in redis, and is read and updated by a navigation server minuteby minute.

At present, road segment weights are stored in A-star (i.e., a routecalculation method) by using a static array, and only data in a currentone minute is stored. After a predicted road segment speed is added,during route calculation, it is likely that a weight corresponding to aroad segment speed in the future needs to be used, so that a roadsegment weight in the future needs to be stored. In comprehensiveconsideration of storage and efficiency of a server and a relativelylarge quantity of short route navigation scenarios for users of mobilephone maps, a solution of caching weights of 60 minutes in the future toperform update minute by minute may be used.

In an embodiment, after a road segment weight of the target road segmentat the second moment that is in the future is determined, routecalculation may be implemented, to determine a road segment that needsto be added to a traveling route planned on a map. Specifically, whetherthe target road segment is an advantageous road segment in a roadnetwork may be determined according to a road segment weight of thetarget road segment at the second moment. The feature of the target roadsegment may include the road segment weight of the target road segment.When the target road segment is an advantageous road segment in a roadnetwork, the target road segment presented on a map is determinedaccording to a road segment identifier of the target road segment, andthe target road segment presented on the map is added to a travelingroute planned on the map, to implement selection of a road segment addedto a route during a route calculation process.

In an embodiment, determining whether the target road segment is anadvantageous road segment in a road network according to the roadsegment weight of the target road segment at the second moment that isin the future may further comprise: determining whether the road segmentweight of the target road segment at the second moment is greater than apreset weight threshold, and determining the target road segment is theadvantageous road segment in the road network when the road segmentweight of the target road segment at the second moment is greater thanthe preset weight threshold.

In an embodiment, the foregoing route calculation implementation processmay be updated minute by minute. For example, the road segment weight ofthe road segment speed is updated minute by minute, so as to update atraveling route planned by using the road segment weight updated minuteby minute.

In an embodiment, FIG. 10 shows an application example of performing aroute calculation in a mobile phone map by using a road segment weightaccording to an embodiment of the present application. In a roadsegment, as shown by a black thick solid line, with a predicted roadsegment speed according to an embodiment of the present application, aroad segment speed greater than 70% of a speed limit accounts for 10.84%and a road segment speed greater than 50% of the speed limit and lessthan 70% of the speed limit accounts for 45.78%, which are both higherthan cases in which the percentages of the road segment speed greaterthan 70% and 50% are respectively 4.85% and 39.80% of a relatedsolution, as shown by a black thick dashed line. The related solutionmay use a real-time road segment speed. Moreover, for a low-speed roadsegment, in the road segment with a predicted road segment speed, a roadsegment speed less than 30% of a speed limit accounts for 3.61%, and aroad segment speed less than 10% of the speed limit accounts for 20.48%,which are lower than cases in which the percentages of the road segmentspeed less than 30% and 10% are respectively 4.85% and 27.18% of therelated solution. In view of the above, performing route calculation byusing a predicted road segment speed in the future is more proper.

In addition, in the route calculation logic, an original route servicemay use logic of reading a weight in a current minute. After thepredicting road segment speed is added, in an embodiment of thisapplication, the logic may be changed to accumulating times of passingroad segments, and during route calculation, reading a weightcorresponding to the road segment at a moment after the accumulatedtimes for calculation. An accumulated time may start from a startingposition and is accumulated with passing times road segment by roadsegment, and a passing time of a road segment may be obtained bydividing a road segment length by a predicted road segment speed.

A road segment speed prediction apparatus provided according to anembodiment of this application is described below. The road segmentspeed prediction apparatus described below may be considered as programmodules that need to be set by a server for implementing the roadsegment speed prediction method provided by the embodiments of thisapplication. Mutual reference may be made between the road segment speedprediction apparatus described below and the road segment speedprediction method described above.

FIG. 11 is a structural block diagram of a road segment speed predictionapparatus according to an embodiment of this application. The apparatusmay be applied to the server, and referring to FIG. 11, the apparatusmay include:

a first-moment road segment speed determining module 100, configured todetermine a road segment speed of a target road segment at a firstmoment;

a previous-moment road segment speed and mean value determining module200, configured to determine a road segment speed of the target roadsegment at each set moment before the first moment and a historical roadsegment speed mean value of the target road segment before the firstmoment;

a prediction feature determining module 300, configured to determine acorresponding road segment speed prediction feature of the target roadsegment at a second moment at least according to the road segment speedof the target road segment at the first moment, the road segment speedof the target road segment at each set moment before the first moment,and the historical road segment speed mean value of the target roadsegment before the first moment, the second moment being a future momentposterior to the first moment and having a predetermined time differencefrom the first moment; and

a prediction module 400, configured to predict a road segment speed ofthe target road segment at the second moment according to the roadsegment speed prediction feature and a pre-trained road segment speedprediction model.

FIG. 12 is a structural block diagram of a road segment speed predictionapparatus according to an embodiment of this application. With referenceto FIG. 11 and FIG. 12, the apparatus may further include:

a model training module 500, configured to determine a road segmentspeed prediction training feature of the target road segment at eachmoment of each time cycle of a set time limit, to obtain a plurality ofpieces of sample data, one piece of sample data representing a roadsegment speed prediction training feature of the target road segment atone moment of one time cycle of the set time limit, and the road segmentspeed prediction training feature of the target road segment at onemoment of one time cycle of the set time limit at least including: aroad segment speed of the target road segment in the one moment of theone time cycle of the set time limit and a road segment speed of thetarget road segment at each set moment before the one moment andhistorical road segment speed mean value of the target road segmentbefore the one moment; and obtain the road segment speed predictionmodel by training according to a machine learning algorithm and theplurality of pieces of sample data.

In an embodiment, the road segment speed prediction training feature ofthe target road segment in one moment of one time cycle of the set timelimit further includes:

a speed clustering interval of the road segment speed of the target roadsegment at the one moment of the one time cycle, a previous speedclustering interval and a next speed clustering interval thereof, a timeof the one moment, a time at which the target road segment enters thespeed clustering interval of the road segment speed, a duration duringwhich the target road segment is in the speed clustering interval of theroad segment speed, and a road segment feature of the target roadsegment.

The prediction feature determining module 300 that is configured todetermine a corresponding road segment speed prediction feature of thetarget road segment at a second moment at least according to the roadsegment speed of the target road segment at the first moment, the roadsegment speed of the target road segment at each set moment before thefirst moment, and the historical road segment speed mean value of thetarget road segment before the first moment specifically includes:

determining the corresponding road segment speed prediction feature ofthe target road segment at the second moment according to the roadsegment speed of the target road segment at the first moment, the roadsegment speed of the target road segment at each set moment before thefirst moment, the historical road segment speed mean value of the targetroad segment before the first moment, a target speed clustering intervalof the road segment speed of the target road segment at the firstmoment, a previous speed clustering interval and a next speed clusteringinterval thereof, a time point at which the target road segment entersthe target speed clustering interval, a duration during which the targetroad segment is in the target speed clustering interval, a time point ofthe first moment, and the road segment feature of the target roadsegment.

FIG. 13 shows still a structural block diagram of a road segment speedprediction apparatus according to an embodiment of this application.With reference to FIG. 12 and FIG. 13, the apparatus may furtherinclude:

a clustering interval division module 600, configured to determine ahistorical road segment speed mean value of the target road segment ateach moment; and cluster the historical road segment speed mean value ofthe target road segment at each moment a plurality of times until acenter of each speed clustering interval after clustering is the same asa center of each speed clustering interval of previous clustering, toobtain k speed clustering intervals, k being a set value.

In an embodiment, the clustering interval division module 600 that isconfigured to cluster the historical road segment speed mean value ofthe target road segment at each moment a plurality of times until acenter of each speed clustering interval after clustering is the same asa center of each speed clustering interval of previous clusteringfurther includes:

randomly selecting historical road segment speed mean values at kmoments as initial centers of k speed clustering intervals;

for a historical road segment speed mean value at any remaining moment,determining at least one initial center temporally connected to theremaining moment in the respective initial centers, determining adissimilarity between the historical road segment speed mean value inthe remaining moment and each temporally connected initial center, andclustering the historical road segment speed mean value at the remainingmoment into a speed clustering interval corresponding to an initialcenter that has a lowest dissimilarity and that is temporally connectedthereto, to obtain an initial speed clustering interval;

determining a center of each initial speed clustering interval, andre-clustering a historical road segment speed mean value at each momentaccording to a dissimilarity between the historical road segment speedmean value at each moment and each temporally connected center, toobtain a re-clustered speed clustering interval; and

re-clustering the historical road segment speed in each moment by usinga center of each speed clustering interval of previous clustering untila center of each re-clustered speed clustering interval is the same asthe center of each speed clustering interval of previous clustering.

A speed clustering interval may include a time period dimension and aroad segment speed dimension. FIG. 14 shows a structural block diagramof a road segment speed prediction apparatus according to an embodimentof this application. With reference to FIG. 13 and FIG. 14, theapparatus may further include:

a target interval determining module 700, configured to determine aspeed clustering interval whose a time period dimension matches thefirst moment, to obtain a target speed clustering interval of the roadsegment speed of the target road segment at the first moment.

FIG. 15 shows a structural block diagram of a road segment speedprediction apparatus according to an embodiment of this application.With reference to FIG. 12 and FIG. 15, the apparatus may furtherinclude:

a Kalman filter processing module 800, configured to: for one piece ofsample data, compare a road segment speed in a corresponding moment inthe sample data predicted by using a road segment speed prediction modelwith a real road segment speed in the corresponding moment in the sampledata, determine the sample data as noise when a difference aftercomparison is greater than a difference threshold, and perform smoothingon the noise by using a Kalman filter.

Further, as shown in FIG. 15, the road segment speed predictionapparatus provided in an embodiment of this application may furtherinclude:

a road segment speed presentation control module 900, configured todetermine the target road segment according to a road segment identifierof the target road segment from a plurality of road segments presentedon a map, and associate the predicted road segment speed of the targetroad segment at the second moment that is in the future with the targetroad segment presented on the map, so that when the target road segmentis presented on the map, the road segment speed of the target roadsegment at the second moment that is in the feature is presented, eachroad segment presented on the map corresponding to a unique road segmentidentifier; and/or

a road segment weight determining and route calculation module 1000,configured to divide a road segment length of the target road segment bythe predicted road segment speed, to obtain a road segment weight of thetarget road segment at the second moment that is in the future,determine the target road segment as an advantageous road segment in aroad network when the road segment weight of the target road segment atthe second moment that is in the future is greater than a preset weightthreshold, determine the target road segment presented on the mapaccording to the road segment identifier of the target road segment, andadd the target road segment presented on the map to a traveling routeplanned on the map.

The road segment weight of the target road segment at the second momentthat is in the future may be used for route calculation.

In an embodiment, the road segment speed presentation control module 900and the road segment weight determining and route calculation module1000 may be used in an alternative way.

The embodiments of this application further provide a server. The servermay be loaded with corresponding program modules of the road segmentspeed prediction apparatus described above, to implement a segment speedprediction function. A hardware structure the server may, as shown inFIG. 16, include: at least one processor 1, at least one communicationsinterface 2, at least one memory 3, and at least one communications bus4.

In an embodiment of this application, a quantity of each of theprocessor 1, the communications interface 2, the memory 3, and thecommunications bus 4 is at least one, and communication among theprocessor 1, the communications interface 2, and the memory 3 isimplemented by using the communications bus 4.

The processor 1 may be a Central Processing Unit (CPU) or anApplication-Specific Integrated Circuit (ASIC) or may be configured asone or more integrated circuits for implementing the embodiments of thepresent application.

The memory 3 may be a non-transitory computer readable medium thatincludes a high-speed RAM memory, or may include a non-volatile memory(non-volatile memory), for example, at least one magnetic disk storage.

The memory 3 stores a program applicable to the processor 1, and theprogram is used to:

determine a road segment speed of a target road segment in a firstmoment;

determine a road segment speed of the target road segment at each setmoment before the first moment and a historical road segment speed meanvalue of the target road segment before the first moment;

determine a corresponding road segment speed prediction feature of thetarget road segment at a second moment at least according to the roadsegment speed of the target road segment at the first moment, the roadsegment speed of the target road segment at each set moment before thefirst moment, and the historical road segment speed mean value of thetarget road segment before the first moment, the second moment being afuture moment posterior to the first moment and having a predeterminedtime difference from the first moment; and

predict a road segment speed of the target road segment at the secondmoment according to the road segment speed prediction feature and apre-trained road segment speed prediction model.

In an embodiment, the descriptions above describe subdivided functionsand extended functions of the program

The embodiments of this application further provide a storage medium,the storage medium storing an executable program, and the program beingused to:

determine a road segment speed of a target road segment at a firstmoment;

determine a road segment speed of the target road segment at each setmoment before the first moment and a historical road segment speed meanvalue of the target road segment before the first moment;

determine a corresponding road segment speed prediction feature of thetarget road segment at a second moment at least according to the roadsegment speed of the target road segment at the first moment, the roadsegment speed of the target road segment at each set moment before thefirst moment, and the historical road segment speed mean value of thetarget road segment before the first moment, the second moment being afuture moment posterior to the first moment and having a predeterminedtime difference from the first moment; and

predict a road segment speed of the target road segment at the secondmoment according to the road segment speed prediction feature and apre-trained road segment speed prediction model.

The embodiments of this application provide a computer program productincluding instructions, running on a computer, causing the computer toperform the road segment prediction method provided in the embodimentsof this application.

The embodiments in this specification are all described in a progressivemanner. Description of each of the embodiments focuses on differencesfrom other embodiments, and reference may be made to each other for thesame or similar parts among respective embodiments. The apparatusembodiments are substantially similar to the method embodiments andtherefore are only briefly described, and reference may be made to themethod embodiments for the associated part.

A person skilled in the art may further realize that, in combinationwith the embodiments herein, units and algorithm, steps of each exampledescribed can be implemented with electronic hardware, computersoftware, or the combination thereof. To describe the interchangeabilitybetween the hardware and the software, compositions and steps of eachexample have been generally described according to functions in theforegoing descriptions. Whether the functions are performed by hardwareor software depends on particular applications and design constraintconditions of the technical solutions. A person skilled in the art mayuse different methods to implement the described functions for eachparticular application, but it is not to be considered that theimplementation goes beyond the scope of this application.

In combination with the embodiments herein, steps of the method oralgorithm described may be directly implemented using hardware, asoftware module executed by a processor, or the combination thereof. Thesoftware module may be placed in a non-transitory computer readablemedium. Specifically, the software module may be placed in a randomaccess memory (RAM), a memory, a read-only memory (ROM), an electricallyprogrammable ROM (EPROM), an electrically erasable programmable ROM(EEPROM), a register, a hard disk, a removable magnetic disk, a CD-ROM,or any storage medium of other forms in the technical field.

The foregoing description of the disclosed embodiments enables a personskilled in the art to implement or use the present embodiments. Variousmodifications to the embodiments are obvious to the person skilled inthe art, and general principles defined in this specification may beimplemented in other embodiments without departing from the spirit orscope of the present disclosure. Therefore, the present application isnot limited to these embodiments illustrated in the present disclosure,but needs to conform to the broadest scope consistent with theprinciples and novel features disclosed in the present disclosure.

What is claimed is:
 1. A method of predicting a moving speed on a targetroad segment, the method comprising: obtaining a first moving speed onthe target road segment at a first time point; obtaining a plurality ofsecond moving speeds on the target road segment at each of a pluralityof time points before the first time point; obtaining a mean historicalspeed on the target road segment at the first time point during previoustime cycles; determining a speed prediction feature of the target roadsegment at a second time point based on the first moving speed, theplurality of second moving speeds, the mean historical speed on thetarget road segment at the first time point during the previous timecycles, a target speed clustering interval on the target road segment atthe first time point, and a third time point at which the target roadsegment enters the target speed clustering interval, the second timepoint being subsequent to the first time point; predicting the movingspeed on the target road segment at the second time point by inputting,into a pre-trained road segment speed prediction model, the first movingspeed, the plurality of second moving speeds, the mean historical speedon the target road segment at the first time point during the previoustime cycles, the target speed clustering interval, and the third timepoint at which the target road segment enters the target speedclustering interval of the speed prediction feature of the target roadsegment at the second time point; and outputting the predicted movingspeed on the target road segment at the second time point to a travelroute calculation.
 2. The method according to claim 1, furthercomprising: determining a speed prediction training feature of thetarget road segment at each of a plurality of time points in a pluralityof time cycles of a time range; obtaining a plurality of pieces ofsample data based on the determined speed prediction training featuresof the target road segment, each of the plurality of pieces of sampledata representing the speed prediction training feature of the targetroad segment at one of the plurality of time points in the plurality ofthe time cycles of the time range; and training the road segment speedprediction model according to a machine learning algorithm and theplurality of pieces of sample data, wherein the speed predictiontraining feature of the target road segment at the one of the pluralityof time points in one of the plurality of time cycles includes a speedon the target road segment at the one of the plurality of time points, aspeed on the target road segment at each of a subset of the plurality oftime points before the one of the plurality of time points, and a meanhistorical speed on the target road segment at the one of the pluralityof time points during the one of the plurality of time cycles.
 3. Themethod according to claim 2, wherein the speed prediction trainingfeature of the target road segment at the one of the plurality of timepoints includes a speed clustering interval on the target road segmentat the one of the plurality of time points, a previous speed clusteringinterval and a next speed clustering interval of the speed clusteringinterval, a time point at which the target road segment enters the speedclustering interval, a duration during which the target road segment isin the speed clustering interval, and a road segment feature of thetarget road segment.
 4. The method according to claim 1, wherein thedetermining the speed prediction feature of the target road segment atthe second time point further comprises: determining the speedprediction feature of the target road segment at the second time pointbased on previous speed clustering interval and a next speed clusteringinterval of the target speed clustering interval, a duration duringwhich the target road segment is in the target speed clusteringinterval, and a road segment feature of the target road segment.
 5. Themethod according to claim 4, further comprising: determining a meanhistorical speed on the target road segment for each of the plurality oftime points; and clustering the mean historical speed on the target roadsegment for each of the plurality of time points a plurality of timesuntil a center of each speed clustering interval is the same as a centerof a previous speed clustering interval.
 6. The method according toclaim 5, wherein the clustering further comprises: randomly selectingthe mean historical speed on the target road segment at k time points asinitial centers of k speed clustering intervals; for the mean historicalspeed for each of a plurality of remaining time points, determining atleast one of the initial centers temporally connected to the respectiveremaining time point, determining a dissimilarity between the meanhistorical speed at the respective remaining time point and the at leastone of the initial centers, and clustering the mean historical speed atthe respective remaining time point into the speed clustering intervalcorresponding to one of the at least one of the initial centers that hasa lowest dissimilarity among the determined dissimilaritiescorresponding to the at least one of the initial centers; adjusting theinitial centers based on the clustered mean historical speed at each ofthe plurality of remaining time points; re-clustering the meanhistorical speed at each of the plurality of time points based on theadjusted initial centers; and re-clustering the mean historical speed ateach of the plurality of time points by using a center of each speedclustering interval of previous clustering until a center of eachre-clustered speed clustering interval is the same as the center of eachspeed clustering interval of the previous clustering.
 7. The methodaccording to claim 5, wherein each of the speed clustering intervals isdefined by a time period and a road segment speed, and the target speedclustering interval on the target road segment at the first time pointis one of the speed clustering intervals which has a time period thatincludes the first time point.
 8. The method according to claim 2,further comprising: for one piece of the plurality of pieces of sampledata, comparing a road segment speed at a corresponding time point inthe sample data predicted using the pre-trained road segment speedprediction model with a real road segment speed at the correspondingtime point in the sample data; and determining the one piece of theplurality of pieces of sample data as noise when a difference betweenthe road segment speed at the corresponding time point in the sampledata predicted using the pre-trained road segment speed prediction modeland the real road segment speed at the corresponding time point in thesample data is greater than a threshold, and performing smoothing on thenoise by using a Kalman filter.
 9. The method according to claim 1,further comprising: determining the target road segment according to aroad segment identifier of the target road segment from a plurality ofroad segments presented on a map, and associating the predicted movingspeed on the target road segment at the second time point with thetarget road segment; determining a road segment weight of the targetroad segment at the second time point by dividing a road segment lengthof the target road segment by the predicted moving speed on the targetroad segment at the second time point; determining the target roadsegment as an advantageous road segment in a road network when the roadsegment weight of the target road segment at the second time point isgreater than a threshold; and adding the target road segment presentedon the map to a traveling route.
 10. A road segment speed predictionapparatus, comprising: processing circuitry configured to obtain a firstmoving speed on a target road segment at a first time point; obtain aplurality of second moving speeds on the target road segment at each ofa plurality of time points before the first time point; obtain a meanhistorical speed on the target road segment at the first time pointduring previous time cycles; determine a speed prediction feature of thetarget road segment at a second time point based on the first movingspeed, the plurality of second moving speeds, the mean historical speedon the target road segment at the first time point during the previoustime cycles, a target speed clustering interval on the target roadsegment at the first time point, and a third time point at which thetarget road segment enters the target speed clustering interval, thesecond time point being subsequent to the first time point; predict amoving speed on the target road segment at the second time point byinputting, into a pre-trained road segment speed prediction model, thefirst moving speed, the plurality of second moving speeds, the meanhistorical speed on the target road segment at the first time pointduring the previous time cycles, the target speed clustering interval,and the third time point at which the target road segment enters thetarget speed clustering interval of the speed prediction feature of thetarget road segment at the second time point; and output the predictedmoving speed on the target road segment at the second time point to atravel route calculation.
 11. The road segment speed predictionapparatus according to claim 10, wherein the processing circuitry isfurther configured to determine a speed prediction training feature ofthe target road segment at each of a plurality of time points in aplurality of time cycles of a time range, obtain a plurality of piecesof sample data based on the determined speed prediction trainingfeatures of the target road segment, each of the plurality of pieces ofsample data representing the speed prediction training feature of thetarget road segment at one of the plurality of time points in theplurality of the time cycles of the time range, and train the roadsegment speed prediction model according to a machine learning algorithmand the plurality of pieces of sample data, and the speed predictiontraining feature of the target road segment at the one of the pluralityof time points in one of the plurality of time cycles includes a speedon the target road segment at the one of the plurality of time points, aspeed on the target road segment at each of a subset of the plurality oftime points before the one of the plurality of time points, and a meanhistorical speed on the target road segment at the one of the pluralityof time points during the one of the plurality of time cycles.
 12. Theroad segment speed prediction apparatus according to claim 11, whereinthe speed prediction training feature on the target road segment at theone of the plurality of time points includes a speed clustering intervalon the target road segment at the one of the plurality of time points, aprevious speed clustering interval and a next speed clustering intervalof the speed clustering interval, a time point at which the target roadsegment enters the speed clustering interval, a duration during whichthe target road segment is in the speed clustering interval, and a roadsegment feature of the target road segment, and the processing circuitryis further configured to determine the speed prediction feature of thetarget road segment at the second time point based on a previous speedclustering interval and a next speed clustering interval of the targetspeed clustering interval, a duration during which the target roadsegment is in the target speed clustering interval, and a road segmentfeature of the target road segment.
 13. The road segment speedprediction apparatus according to claim 11, wherein the processingcircuitry is further configured to determine the target road segmentaccording to a road segment identifier of the target road segment from aplurality of road segments presented on a map, and associate thepredicted moving speed on the target road segment at the second timepoint with the target road segment; determine a road segment weight ofthe target road segment at the second time point by dividing a roadsegment length of the target road segment by the predicted moving speedon the target road segment at the second time point; determine thetarget road segment as an advantageous road segment in a road networkwhen the road segment weight of the target road segment at the secondtime point is greater than a threshold; and add the target road segmentpresented on the map to a traveling route.
 14. A server, comprising: amemory coupled to processing circuitry, the processing circuitryconfigured to obtain a first moving speed on a target road segment at afirst time point; obtain a plurality of second moving speeds on thetarget road segment at each of a plurality of time points before thefirst time point; obtain a mean historical speed on the target roadsegment at the first time point during previous time cycles; determine aspeed prediction feature of the target road segment at a second timepoint based on the first moving speed, the plurality of second movingspeeds, the mean historical speed on the target road segment at thefirst time point during the previous time cycles, a target speedclustering interval on the target road segment at the first time point,and a third time point at which the target road segment enters thetarget speed clustering interval, the second time point being subsequentto the first time point; predict a moving speed on the target roadsegment at the second time point by inputting, into a pre-trained roadsegment speed prediction model, the first moving speed, the plurality ofsecond moving speeds, the mean historical speed on the target roadsegment at the first time point during the previous time cycles, thetarget speed clustering interval, and the third time point at which thetarget road segment enters the target speed clustering interval of thespeed prediction feature of the target road segment at the second timepoint; and output the predicted moving speed on the target road segmentat the second time point to a travel route calculation.
 15. The serverof claim 14, wherein the processing circuitry is further configured todetermine a speed prediction training feature of the target road segmentat each of a plurality of time points in a plurality of time cycles of atime range; obtain a plurality of pieces of sample data based on thedetermined speed prediction training features of the target roadsegment, each of the plurality of pieces of sample data representing thespeed prediction training feature of the target road segment at one ofthe plurality of time points in the plurality of the time cycles of thetime range; and train the road segment speed prediction model accordingto a machine learning algorithm and the plurality of pieces of sampledata, and the speed prediction training feature of the target roadsegment at the one of the plurality of time points during one of theplurality of time cycles includes a speed on the target road segment atthe one of the plurality of time points, a speed on the target roadsegment at each of a subset of the plurality of time points before theone of the plurality of time points, and a mean historical speed on thetarget road segment at the one of the plurality of time points duringthe one of the plurality of time cycles.
 16. The server of claim 15,wherein the speed prediction training feature on the target road segmentat the one of the plurality of time points includes a speed clusteringinterval on the target road segment at the one of the plurality of timepoints, a previous speed clustering interval and a next speed clusteringinterval of the speed clustering interval, a time point at which thetarget road segment enters the speed clustering interval, a durationduring which the target road segment is in the speed clusteringinterval, and a road segment feature of the target road segment.
 17. Theserver of claim 14, wherein the processing circuitry is furtherconfigured to determine the speed prediction feature of the target roadsegment at the second time point based on a previous speed clusteringinterval and a next speed clustering interval of the target speedclustering interval, a duration during which the target road segment isin the target speed clustering interval, and a road segment feature ofthe target road segment.
 18. A non-transitory computer-readable mediumstoring instructions which, when executed by a computer, cause thecomputer to perform: obtaining a first moving speed on a target roadsegment at a first time point; obtaining a plurality of second movingspeeds on the target road segment at each of a plurality of time pointsbefore the first time point; obtaining a mean historical speed on thetarget road segment at the first time point during previous time cycles;determining a speed prediction feature of the target road segment at asecond time point based on the first moving speed, the plurality ofsecond moving speeds, the mean historical speed on the target roadsegment at the first time point during the previous time cycles, atarget speed clustering interval on the target road segment at the firsttime point, and a third time point at which the target road segmententers the target speed clustering interval, the second time point beingsubsequent to the first time point; predicting a moving speed on thetarget road segment at the second time point by inputting, into apre-trained road segment speed prediction model, the first moving speed,the plurality of second moving speeds, the mean historical speed on thetarget road segment at the first time point during the previous timecycles, the target speed clustering interval, and the third time pointat which the target road segment enters the target speed clusteringinterval of the speed prediction feature of the target road segment atthe second time point; and outputting the predicted moving speed on thetarget road segment at the second time point to a travel routecalculation.
 19. The non-transitory computer-readable medium of claim18, the instructions further causing the computer to perform:determining a speed prediction training feature of the target roadsegment at each of a plurality of time points in a plurality of timecycles of a time range; obtaining a plurality of pieces of sample databased on the determined speed prediction training features of the targetroad segment, each of the plurality of pieces of sample datarepresenting the speed prediction training feature of the target roadsegment at one of the plurality of time points in the plurality of thetime cycles of the time range; and training the road segment speedprediction model according to a machine learning algorithm and theplurality of pieces of sample data, wherein the speed predictiontraining feature of the target road segment at the one of the pluralityof time points in one of the plurality of time cycles includes a speedon the target road segment at the one of the plurality of time points, aspeed on the target road segment at each of a subset of the plurality oftime points before the one of the plurality of time points, and a meanhistorical speed on the target road segment at the one of the pluralityof time points during the one of the plurality of time cycles.
 20. Thenon-transitory computer-readable medium of claim 19, wherein the speedprediction training feature on the target road segment at the one of theplurality of time points includes a speed clustering interval on thetarget road segment at the one of the plurality of time points, aprevious speed clustering interval and a next speed clustering intervalof the speed clustering interval, a time point at which the target roadsegment enters the speed clustering interval, a duration during whichthe target road segment is in the speed clustering interval, and a roadsegment feature of the target road segment.